home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / dm10e / jstest.asp < prev    next >
Text File  |  1999-04-29  |  1KB  |  52 lines

  1. <%@ LANGUAGE="JScript" %>
  2.  
  3. <HTML>
  4. <BODY>
  5.  
  6. <pre>
  7. <b>
  8. Geocel DevMailer 1.0
  9. JScript Usage Example
  10. (c) 1999, Geocel International, Inc.
  11. </b>
  12. </pre>
  13.  
  14. <%
  15.  
  16.     // Create DevMailer Object
  17.      Mailer = Server.CreateObject("Geocel.Mailer");
  18.  
  19.     // Add first SMTP server
  20.      Mailer.AddServer("mailhost.geocel.com", 25);
  21.     
  22.     // Set Sender Information
  23.      Mailer.FromAddress = "support@geocel.com";
  24.      Mailer.FromName = "Geocel Support";
  25.  
  26.     // Add a recipient to the message
  27.      Mailer.AddRecipient("lham@geocel.com", "L. Ham");
  28.  
  29.     // Set the Subject and Body
  30.      Mailer.Subject = "Welcome to DevMailer JScript Test"
  31.  
  32.      Mailer.Body =    "Test Message Body Line 1\r\n" +
  33.             "Test Message Body Line 2\r\n" ;
  34.  
  35.     // Send Email - Perform Error Checking
  36.     bSuccess = Mailer.Send();
  37.  
  38.     if( !bSuccess ) {
  39.         if( !Mailer.Queued )
  40.             Response.Write("<h3>Could not send message..queueing failed!</h3>");
  41.         else
  42.         Response.Write("<h3>Could not send message..queued instead!</h3>");
  43.  
  44.     } 
  45.         else
  46.         Response.Write("<h3>Message Sent Successfully!</h3>");
  47. %>
  48.  
  49. <BR>
  50.  
  51. </BODY>
  52. </HTML>